:host {
  position: relative;
  --header-inner-max-width: 100%;
  --header-inner-padding: 0 24px;
  --search-display: block;

  @media screen and (max-width: 1200px) {
    --search-display: none;
  }
}

.TDesign-header-notice {
  width: 100%;
  line-height: 24px;
  padding: 8px 16px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  
  &.primary {
    background-color: var(--brand-main);
  }
  
  &__content {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    transition: all .2s;
    
    &:hover {
      color: rgba(255, 255, 255, 1);
    }
  }
  
  &__close {
    display: inline-flex;
    align-items: center;
    position: absolute;
    right: 8px;
    cursor: pointer;
    transition: all .2s;
    color: rgba(255, 255, 255, 0.9);

    &:hover {
      color: rgba(255, 255, 255, 1);
    }

    svg {
      width: 16px;
      height: 16px;
    }
  }
}

.TDesign-header {
  height: var(--header-height);
  background-color: var(--bg-color-container);
  color: var(--text-secondary);
  position: relative;
  z-index: 1400;
  box-shadow: var(--header-box-shadow);

  &-inner {
    padding: var(--header-inner-padding);
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    max-width: var(--header-inner-max-width);
    margin: auto;
    transition: all 0.25s var(--anim-time-fn-easing);
  }

  &-left {
    display: flex;
    align-items: center;
  }

  .slot-search {
    display: var(--search-display);
  }

  &-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    column-gap: 8px;

    &__link {
      cursor: pointer;
      padding: 4px 16px;
      box-sizing: border-box;
      height: 32px;
      line-height: 24px;
      color: var(--text-primary);
      text-decoration: none;
      border-radius: var(--border-radius);
      transition: all 0.1s;
      display: inline-block;
      vertical-align: middle;
      word-break: keep-all;
      flex-shrink: 0;

      &:hover {
        background: var(--bg-color-container-hover);

        .icon {
          svg path {
            d: path("M3.75 10.2002L7.99274 5.7998L12.2361 10.0425");
          }
        }
      }

      &.active {
        color: var(--text-primary);
        background: var(--bg-color-container-select);
      }

      .icon {
        width: 16px;
        height: 16px;
        display: inline-block;
        vertical-align: middle;
        margin-top: -4px;
        margin-left: 4px;

        svg path {
          transition: d 0.2s;
          stroke: currentColor;
        }
      }
    }

    &__git,
    &__translate {
      display: inline-flex;
      color: var(--text-primary);
      border-radius: var(--border-radius);
      transition: all 0.2s linear;
      width: 32px;
      height: 32px;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      &:hover {
        background: var(--bg-color-container-hover);
      }
    }

    &__git-icon,
    &__translate-icon {
      width: 24px;
      height: 24px;
      display: inline-block;
    }

    td-theme-tabs {
      margin-left: 8px;
    }
  }
}
